<?php defined('IN_IA') or exit('Access Denied');?><!DOCTYPE html>
<html lang="en">
    <head>
		<meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
        <title><?php  echo $info[0]['title'];?></title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> 
		<link rel="stylesheet" type="text/css" href="<?php  echo MODULE_URL?>template/mobile/css/windy.css?v=20" />
		<link rel="stylesheet" type="text/css" href="<?php  echo MODULE_URL?>template/mobile/css/demo.css?v=s3" />
		<link rel="stylesheet" type="text/css" href="<?php  echo MODULE_URL?>template/mobile/css/style1.css?v=s4" />
		<script type="text/javascript" src="<?php  echo MODULE_URL?>template/mobile/js/modernizr.custom.79639.js?v=27"></script>
		<noscript><link rel="stylesheet" type="text/css" href="<?php  echo MODULE_URL?>template/mobile/css/noJS.css?v=24" /></noscript>
    </head>
    <body>
        <div class="container">
			<header class="codrops-header">
				<nav class="codrops-demos">
					<h1><?php  echo $infoset[0]['title'];?></h1>
				</nav>
			</header>
			<section class="main">
				<div class="windy-demo">
					<ul id="wi-el" class="wi-container">
					<?php  if(is_array($allpic)) { foreach($allpic as $item) { ?>
						<li><img src="<?php  echo $_W['attachurl'];?><?php  echo $item['ew_img'];?>"><h4><?php  echo $item['ew_title'];?></h4><p><?php  echo $item['ew_intro'];?></p></li>
					<?php  } } ?>	
					</ul>
					<nav>
						<span id="nav-prev">prev</span>
						<span id="nav-next">next</span>
					</nav>
				</div>
				<p class="info"><strong>Tip:</strong><?php  echo $infoset[0]['tips'];?></p>
			</section>
        </div>
        <script type="text/javascript" src="http://libs.useso.com/js/jquery/1.8.2/jquery.min.js"></script>
        <script type="text/javascript" src="<?php  echo MODULE_URL?>template/mobile/js/jquery.windy.js"></script>
        <script type="text/javascript">	
			$(function() {

				var $el = $( '#wi-el' ),
					windy = $el.windy(),
					allownavnext = false,
					allownavprev = false;

				$( '#nav-prev' ).on( 'mousedown', function( event ) {

					allownavprev = true;
					navprev();
				
				} ).on( 'mouseup mouseleave', function( event ) {

					allownavprev = false;
				
				} );

				$( '#nav-next' ).on( 'mousedown', function( event ) {

					allownavnext = true;
					navnext();
				
				} ).on( 'mouseup mouseleave', function( event ) {

					allownavnext = false;
				
				} );

				function navnext() {
					if( allownavnext ) {
						windy.next();
						setTimeout( function() {	
							navnext();
						}, 150 );
					}
				}
				
				function navprev() {
					if( allownavprev ) {
						windy.prev();
						setTimeout( function() {	
							navprev();
						}, 150 );
					}
				}

			});
		</script>
    </body>
</html>